<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="vue.js"></script>
</head>
<body>
  <div id="app">
    <input type="text" v-model="msg">
    {{msg3()}}
     {{msg3()}}
     {{msg3()}}
     {{msg3()}}
     {{msg2}}
     {{msg2}}
     {{msg2}}
     {{msg2}}
     {{msg2}}
     {{msg2}}
     {{msg2}}
     {{msg2}}
     {{msg2}}
     
  </div>
  <script>
    let vm = new Vue({
      el:"#app",
      data:{
        msg:"hello world"
      },
      methods:{
        msg3(){
          console.log("我是methods的方法");
          return this.msg.split("").reverse().join("");
        }
      },
      computed:{
        msg2(){
          console.log("我是计算属性");
          return this.msg.split("").reverse().join("");
        }
      }
    })
  </script>
</body>
</html>